Re: [SQL] string containing (') - Mailing list pgsql-sql

From Herouth Maoz
Subject Re: [SQL] string containing (')
Date
Msg-id l03110703b31be8bf8484@[147.233.148.111]
Whole thread Raw
In response to Re: [SQL] string containing (')  (Brian Baquiran <brianb@evoserve.com>)
List pgsql-sql
At 18:06 +0200 on 20/03/1999, Brian Baquiran wrote:


> >
> > > HI!
> > > Can anyone help,
> > > I want to store a string into a relation that might contain an apostrophe
> > > (').  Is there anyway around this or can I not store such strings.
> > > Thanks for your help
> >
> > '\''
>
> I've always thought the proper way was to use 2 quotes ('').

It is the proper way, as far as compatibility to standard SQL is concerned.
Both methods are supported by PostgreSQL, though.

I have a certain grievance against PostgreSQL and its escaping mechanism,
which makes scripts written in standard SQL produce wrong results if they
have backslashes in them.

Perhaps there should be a switch, SET COMPATIBILITY or something, which
disables incompatible parses from taking place, and allows using legacy
script with little concern for the content of the strings.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-sql by date:

Previous
From: Peter Garner
Date:
Subject: Re: [SQL] string containing (')
Next
From: secret
Date:
Subject: Simple Optimization Problem